//package com.zscat.mall.portal.controller;
//
//
//import com.zscat.common.annotation.IgnoreAuth;
//import com.zscat.common.result.CommonResult;
//import com.zscat.mall.portal.entity.MemberReadHistory;
//import com.zscat.mall.portal.service.MemberReadHistoryService;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.stereotype.Controller;
//import org.springframework.web.bind.annotation.*;
//
//import javax.annotation.Resource;
//import java.util.List;
//
///**
// * 会员商品浏览记录管理Controller
// * Created by zscat on 2018/8/3.
// */
//@Controller
//@Api(tags = "MemberReadHistoryController", description = "会员商品浏览记录管理")
//@RequestMapping("/api/member/readHistory")
//public class MemberReadHistoryController {
//    @Resource
//    private MemberReadHistoryService memberReadHistoryService;
//
//    @IgnoreAuth
//    @ApiOperation("创建浏览记录")
//    @RequestMapping(value = "/create", method = RequestMethod.POST)
//    @ResponseBody
//    public Object create(@RequestBody MemberReadHistory memberReadHistory) {
//        int count = memberReadHistoryService.create(memberReadHistory);
//        if (count > 0) {
//            return new CommonResult().success(count);
//        } else {
//            return new CommonResult().failed();
//        }
//    }
//    @IgnoreAuth
//    @ApiOperation("删除浏览记录")
//    @RequestMapping(value = "/delete", method = RequestMethod.POST)
//    @ResponseBody
//    public Object delete(@RequestParam("ids") List<String> ids) {
//        int count = memberReadHistoryService.delete(ids);
//        if (count > 0) {
//            return new CommonResult().success(count);
//        } else {
//            return new CommonResult().failed();
//        }
//    }
//    @IgnoreAuth
//    @ApiOperation("展示浏览记录")
//    @RequestMapping(value = "/list", method = RequestMethod.GET)
//    @ResponseBody
//    public Object list(Long memberId) {
//        List<MemberReadHistory> memberReadHistoryList = memberReadHistoryService.list(memberId);
//        return new CommonResult().success(memberReadHistoryList);
//    }
//}
